package com.sch.hospital.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sch.hospital.Mapper.RoomMapper;
import com.sch.hospital.domain.Room;
import com.sch.hospital.service.IRoomService;

/**
 * 诊室信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-30
 */
@Service
public class RoomServiceImpl implements IRoomService 
{
    @Autowired
    private RoomMapper roomMapper;

    /**
     * 查询诊室信息
     * 
     * @param id 诊室信息主键
     * @return 诊室信息
     */
    @Override
    public Room selectRoomById(Long id)
    {
        return roomMapper.selectRoomById(id);
    }

    /**
     * 查询诊室信息列表
     * 
     * @param room 诊室信息
     * @return 诊室信息
     */
    @Override
    public List<Room> selectRoomList(Room room)
    {
        return roomMapper.selectRoomList(room);
    }

    /**
     * 新增诊室信息
     * 
     * @param room 诊室信息
     * @return 结果
     */
    @Override
    public int insertRoom(Room room)
    {
        return roomMapper.insertRoom(room);
    }

    /**
     * 修改诊室信息
     * 
     * @param room 诊室信息
     * @return 结果
     */
    @Override
    public int updateRoom(Room room)
    {
        return roomMapper.updateRoom(room);
    }

    /**
     * 批量删除诊室信息
     * 
     * @param ids 需要删除的诊室信息主键
     * @return 结果
     */
    @Override
    public int deleteRoomByIds(Long[] ids)
    {
        return roomMapper.deleteRoomByIds(ids);
    }

    /**
     * 删除诊室信息信息
     * 
     * @param id 诊室信息主键
     * @return 结果
     */
    @Override
    public int deleteRoomById(Long id)
    {
        return roomMapper.deleteRoomById(id);
    }
}
